package com.training.java.core.equals;

public class Laptop {
	private String make;
	private String model;
	
	
	public Laptop(String make, String model) {
		super();
		this.make = make;
		this.model = model;
	}

	@Override
	public int hashCode() {
		return make.hashCode() + model.hashCode();
	}
	
	@Override
	public boolean equals(Object obj) {
		
		if ((obj instanceof Laptop)) {
			
			Laptop that = (Laptop) obj;
			
			return this.make.equals(that.make);
			
		} else 
			
		{		
			return true;
		}
	
	}

}
